home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
90xx
/
9010b.d64
/
tuerme von hanoi
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
977b
|
21 lines
10 PRINT"[147]";TAB(11);"[212][213][197][210][205][197][160][214][207][206][160][200][193][206][207][201]"
20 PRINT"[215]IE HOCH(1-6)?";:Q=6:GOSUB190:M=A:DIMA(3,M):O=2^M-1
30 B$="*[146]":V=6:FORR=17TO18-MSTEP-1:W=R-17+M:FORC=V-WTOV+W:GOSUB200:NEXTC:NEXTR
40 PRINT" [206][207][210][196] [205][201][212][212][197] [211][213][197][196]"
50 PRINT"";:FORX=1TO3:PRINTTAB(13*X-8);X;:NEXTX
60 FORY=1TOM:A(1,Y)=1+M-Y:NEXTY:A(1,0)=M:A(2,0)=0:A(3,0)=0:N=0:TI$="000000"
70 PRINT"[206]AECHSTER [218]UG (Z.[194].: 1 3) ? ";:Q=3:GOSUB190:F=A:GOSUB190:T=A
80 IFA(F,0)>0ANDA(F,A(F,0))<A(T,A(T,0))THEN110
90 IFA(F,0)>0ANDA(T,0)=0THEN110
100 PRINT"[198]ALSCHER [218]UG?[146]";:FORI=1TO3000:NEXT:GOTO70
110 B$="[146] ":R=18-A(F,0):V=13*F-7:W=A(F,A(F,0)):FORC=V-WTOV+W:GOSUB200:NEXTC
120 A(T,0)=A(T,0)+1:A(T,A(T,0))=A(F,A(F,0)):A(F,A(F,0))=0:A(F,0)=A(F,0)-1:N=N+1
130 B$="*[146]":R=18-A(T,0):V=13*T-7:W=A(T,A(T,0)):FORC=V-WTOV+W:GOSUB200:NEXTC
140 IFA(3,0)<>MTHEN70
150 PRINT"[211]PITZE! [196]U HAST";STR$(N);" [218]UEGE IN";STR$(VAL(TI$));" SEC GEBRAUCHT.";
160 PRINT"[196]AS [205]INIMUM SIND";
170 PRINTO;"[218]UEGE.":INPUT"[206]EUES [211]PIEL";A$:IFA$="J"ORA$="[202]"THENRUN
180 END:RUN
190 GETA$:A=VAL(" "+A$):T=A>0ANDA<=Q:ONT+1GOTO190:PRINTA;:RETURN
200 POKE214,R:POKE211,C:SYS58640:PRINTB$;:RETURN